package com.homwee.serialportinspection.model;

public final class Types {
    public static final int INVALID = -1;

    // response arg1
    public static final int RESPONSE_ERR = -1;
    public static final int RESPONSE_OK = 0;

    /*
    * Mode transfer flow: init -> ready -> enable
    *
    */
    public enum FactoryMode {
        STATE_INIT,    /* init mode */
        STATE_READY,   /* uart is ready */
        STATE_DISACTIVE,  /* factory mode is enable */
        STATE_ACTIVE,   /* factory mode is active */
    }

    // request and response type in Message.what
    public enum Request {
        DIRECT_RESPONSE,    // direct response, (String) obj

        POWER_OFF,
        STANDBY,

        SET_SOURCE, // [request] arg1: source
        GET_SOURCE, // [response] arg1: source
        SET_CHANNEL,    // [request] arg1: channel type, arg2: channel number
        GET_CHANNEL,    // [request] arg1: channel type; [response] arg1: channel type, arg2: channel number

        SET_VOLUME, // [request] arg1: volume
        GET_VOLUME, // [response] arg1: volume
        SET_SPDIF_MODE, // [request] arg1: spdif mode
        GET_SPDIF_MODE, // [response] arg1: spdif mode

        SET_PICTURE_MODE,   // [request] arg1: picture mode
        GET_PICTURE_MODE,   // [response] arg1: picture mode

        ENTER_FACTORY_MODE,
        EXIT_FACTORY_MODE,
        ENTER_FACTORY_MENU,
        EXIT_FACTORY_MENU,
        FACTORY_INIT,

        SET_BACKLIGHT,  // [request] arg1: backlight
        GET_BACKLIGHT,  // [response] arg1: backlight

        GET_SW_VERSION, // [response] obj: (String) version

        RESET_WB,
        EXIT_WB,
        SET_WB_PART,    // [request] arg1: part, arg2: value
        GET_WB_PART,    // [request] arg1: part; [response] arg1: value
        SET_CT_MODE,    // [request] arg1: color temperature mode
        GET_CT_MODE,    // [reponse] arg1: color temperature mode
        SHOW_WB_BEFORE, // [request]
        SHOW_WB_AFTER,  // [request]
        SHOW_PATTERN,   // [request] arg1: color(argb)
        CLOSE_PATTERN,
        FACTORY_SET_WB, // [request] arg1: ctMode, arg2: color part, obj: (Integer) gain
        FACTORY_GET_WB, // [request] arg1: ctMode, arg2: color part; [response] arg1: gain
        FACTORY_WB_PATTERN, // [request] arg1: percent, arg2: isEnable

        SET_SOUND_MODE, // [request] arg1: sound mode
        GET_SOUND_MODE, // [response] arg1: sound mode
        SET_MUTE,   // [request] arg1: isMute
        GET_MUTE,   // [response] arg1: isMute
        SET_SOUND_BALANCE, //[request]arg1, 0:100% Left, 1:100% Right, 2:50%Left and 50% Right
        GET_SOUND_BALANCE, //[response]arg1, balance mode

        GET_USB_STORAGE_CNT,    // [response] arg1: count

        SET_ETH_MAC,    // [request] obj: (String) mac
        GET_ETH_MAC,    // [response] obj: (String) mac
        GET_ETH_IP, // [response] obj: (String) ip

        GET_WIFI_MAC,   // [response] obj: (String) mac
        ENABLE_WIFI,
        DISABLE_WIFI,
        GET_WIFI_SCANRESULT,  // [response] obj: (List<ScanResult>) result
        START_WIFI_SCAN,    // [response] arg1: status, -2 mean busy, -1 mean error, 0 mean ok

        GET_BT_VERSION,    // [response] obj: (String) version
        GET_BT_MAC, // [response] obj: (String) mac
        START_BT_DISCOVERY, // [request] obj: (String) btap
        GET_BT_DISCOVERIED_DEV, // [response] obj: (BluetoothDevice) discoveried device
        GET_BT_CONNECTED_DEV,   // [response] obj: (String[]) connected devices

        GET_SERIAL_NUMBER,  // [response] obj: (String) sn

        SEND_KEY,   // [request] arg1: key

        GET_PROJECT_ID, // [response] obj:(String)project id

        GET_AQ_VERSION, // [response] obj:(String)AQ Version

        GET_PQ_VERSION, // [response] obj:(String)PQ Version

        GET_PANEL_VERSION, // [response] obj:(String)Panel version

        GET_DATA_VERSION, // [response] obj:(String)Data version

        GET_COMPILE_TIME, // [response] obj:(String)Compile time

        GET_PANEL_NAME, // [response] obj:(String)Panel name

        GET_HDCP_1_4, // [response] obj:(String)HDCP KEY STATUS

        GET_HDCP_2_2, // [response] obj:(String)HDCP_KEY

        GET_WIDEVINE_STATUS, // [response]

        GET_KEYMASTER_STATUS, // [response]

        GET_PLAYREADY_STATUS, // [response]

        GET_PLAYREADY_2_5_STATUS, // [response]
    }

	public enum Request_CH {
        CONNECT,
		ARC_CEC_OPT,
		KPORT_OFF,
		GET_KEYCODE,
		KPORT_ON,
		GET_LAN_IP,
		WIFI_SCAN,
		PRESET_CHANNEL,
		BT_SCAN,
		GET_VER_INFO,
		KEY_STATUS_CHECK,
		GET_LAN_MAC,
		CHANGE_ATV,
		CHANGE_DTV,
		GET_CURRENT_CHANNEL,
		CHANGE_CHANNEL,
		CHANGE_AIR,
		CHANGE_CABLE,
		CHANGE_SATELLITE,
		SET_VOLUME_0,
		SET_VOLUME_30,
		SET_VOLUME_60,
		SET_VOLUME_100,
		GET_CI_STATUS,
		S_MODE_ON,
		S_MODE_OFF,
		M_MODE_ON,
		M_MODE_OFF,
		AGING_MODE_ON,
		AGING_MODE_OFF,
		USER_FACTORY_RESET,
		CH_FACTORY_RESET,
		AUDIO_BALANCE_0,
		AUDIO_BALANCE_F50,
		AUDIO_BALANCE_50,
		MIC_TEST,
		CHANGE_HDMI1,
		CHANGE_HDMI2,
		CHANGE_HDMI3,
		CHANGE_HDMI4,
		CHANGE_AV1,
		CHANGE_AV2,
		CHANGE_AV3,
		CHANGE_AV4,
		CHANGE_VGA1,
		CHANGE_VGA2,
		CHANGE_YPBPR1,
		CHANGE_YPBPR2,
		USB_COUNT,
		CHANGE_SCART1,
		CHANGE_SCART2,
		SEND_KEYCODE,
		WB_CONNECT,
		WB_PREPARE,
		WB_COLORTEMP_OPTION,
		WB_PICTUR_MODE_OPTION,
		WB_OSD_BACKLIGHT_MAX,
		WB_OSD_BACKLIGHT_MIN,
		WB_R_GAIN_SET,
		WB_G_GAIN_SET,
		WB_B_GAIN_SET,
		WB_STAND_SAVE,
		WB_WARM_SAVE,
		WB_COOL_SAVE,
		WB_R_GAIN_GET,
		WB_G_GAIN_GET,
		WB_B_GAIN_GET,
		WB_RESERVED,
	}

    public enum InputSource {
        ATV,     // ATV input
        DTV,     // <DTV

        CVBS,     // AV 1
        CVBS2,     // AV 2
        CVBS3,     // AV 3
        CVBS4,     // AV 4

        SVIDEO,     // S-video 1
        SVIDEO2,     // S-video 2

        SCART,     // Scart 1
        SCART2,     // Scart 2

        YPBPR,     // Component 1
        YPBPR2,     // Component 2

        VGA,     // VGA input
        VGA2,     // VGA2 input

        HDMI,     // HDMI 1  ///20
        HDMI2,     // HDMI 2
        HDMI3,     // HDMI 3
        HDMI4,     // HDMI 4

        DVI,     // DVI 1
        DVI2,     // DVI 2
        DVI3,     // DVI 2
        DVI4,     // DVI 4

        MEDIAPLAYER,     // MEDIAPLAYER  ///30
        NETPLAYER,
        IPTV,

        OTHER,
    }

    public enum ChannelType {
        ATV,
        DTV,
        RADIO,
        DATA,
    }

    public enum SpdifMode {
        AUTO,
        BYPASS,
        PCM,
        DOLBY_DIGITAL_PLUS,
        DOLBY_DIGITAL,
    }

    public enum PictureMode {
        STANDARD,   // HOME
        VIVID,
        SPORT,
        MOVIE,
        GAME,
        ENERGY_SAVING,
        USER,
    }

    public enum Balance {
        LEFT,       //100% Left
        RIGHT,      //100% Right
        STEREO,     //50% Left, 50% Right
    }

    public enum SoundMode {
        STANDARD,
        VIVID,
        SPORT,
        MOVIE,
        MUSIC,
        NEWS,
        USER,
    }

    public enum ColorTempMode {
        STANDARD,
        COOL,
        WARM,
        USER,
    }

    public static class FactoryColorTempData {
        public int rGain;
        public int gGain;
        public int bGain;
        public int rOffset;
        public int gOffset;
        public int bOffset;
    }

    public enum ColorPart {
        RED,
        GREEN,
        BLUE,
    }

    public enum WifiState {
        CONNECTING, CONNECTED, SUSPENDED, DISCONNECTING, DISCONNECTED, UNKNOWN
    }
}
